Rc.0 Serve Fail on Rollup Step (ES2015 project)

[13:54:47]  ionic-app-scripts 0.0.23
[13:54:47]  watch started ...
[13:54:47]  build dev started ...
[13:54:47]  clean started ...
[13:54:47]  clean finished in 27 ms
[13:54:47]  copy started ...
[13:54:47]  typescript compiler started ...
[13:54:47]  copy finished in 102 ms
[13:54:48]  typescript compiler ready in 1.29 s
[13:54:48]  bundle dev started ...
[13:54:48]  Error: Could not resolve entry (./.tmp/app/main.dev.js)
    at [project]/node_modules/rollup/dist/rollup.js:8602:28
    at process._tickCallback (internal/process/next_tick.js:103:7)

I have done the following:

  1. Completed all Changelog upgrade steps
  2. Upgraded to Node 6.7
  3. Uninstalled Ionic / Cleared Cache / Installed Ionic

Could this be unique to projects using [filename].js extensions rather than [filename].ts extensions?

1 Like

I changed all of the extensions to .ts and the build started to work (of course now I’m missing typings so it still errors because it thinks I wrote typescript)

Is the new build really not going to work for ES2015 projects? There are a lot of users that want to write vanilla JS rather than TypeScript. Angular 2 allows this and Ionic is 99% Angular 2, so why wouldn’t the new build allow ES2015?

I really dont know what is going on here also.

This i also get when i run

Ionic build Ios

[23:27:41]  Error: Could not resolve entry (.tmp/app/main.prod.js)
    at /Users/tobiasqueue/rc0/QueueOnline/node_modules/rollup/dist/rollup.js:8602:28
    at process._tickCallback (internal/process/next_tick.js:103:7)

[23:27:41]  sass started ...
[23:27:42]  sass finished in 1.15 s
[23:27:42]  minify started ...
[23:27:42]  cleancss started ...
[23:27:42]  uglifyjs started ...
[23:27:42]  Error: ENOENT: no such file or directory, open '/Users/tobiasqueue/rc0/QueueOnline/www/build/main.js'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at addFile (/Users/tobiasqueue/rc0/QueueOnline/node_modules/uglify-js/tools/node.js:68:22)
    at /Users/tobiasqueue/rc0/QueueOnline/node_modules/uglify-js/tools/node.js:79:17
    at Array.forEach (native)
    at Object.exports.minify (/Users/tobiasqueue/rc0/QueueOnline/node_modules/uglify-js/tools/node.js:77:26)
    at runUglifyInternal (/Users/tobiasqueue/rc0/QueueOnline/node_modules/@ionic/app-scripts/dist/uglifyjs.js:34:19)
    at runUglify (/Users/tobiasqueue/rc0/QueueOnline/node_modules/@ionic/app-scripts/dist/uglifyjs.js:23:28)
    at Object.uglifyjs (/Users/tobiasqueue/rc0/QueueOnline/node_modules/@ionic/app-scripts/dist/uglifyjs.js:9:12)

[23:27:43]  cleancss finished in 907 ms
[23:27:43]  minify finished in 908 ms
[23:27:43]  build prod finished in 6.15 s
Running command: /Users/tobiasqueue/rc0/queueo

Hello guys

I also have a package I developed myself that I want to use via import, and I am facing the same issue - any clues?

I know the culprit is rollup.js, but I couldn’t find a working solution.

This is probably because of ngc compiler is better to check if methods and variables are declared…so if they are not you will not get thru build.

So REALLY check your code… if you got a method call from html getText() and that method isnt part of typescript code…you get a compile error…

I am facing the same issues

It’s not about ngc, as I haven’t added any custom template logic to my project yet.
The only thing that triggers this is an import of a module from node_modules that is written in typescript and exposes via commonjs.

I don’t think you’re facing the same issue, as OP’s code is not Typescript and yours is. I would start a new thread if I were you, and make sure to mention exactly how you are importing.

Thanks for the encouragement, after a day of struggling I did: Issue with importing an external module in rc0 :slight_smile:

@everyone, please make sure you update to the latest @ionic/app-scripts in the next day or so.

We have been pushing out updates fast and furiously.

npm install @ionic/app-scripts@latest

Thanks,
Dan