Closed xtingray closed 6 years ago
I don't use ng build
My scripts I use are supported here: https://github.com/AckerApple/angular-file/blob/development/package.json#L6
I have npm run build
, npm run watch
, npm start
, and npm test
Hi,
Currently I am using node v8.9.2 and I am trying to find the way to set and run the demo of your project locally. Following your suggestion I tried this:
git clone https://github.com/AckerApple/angular-file.git cd angular-file/ npm install npm run build
Then I got this: Error: Cannot find module '/home/dummy/tmp/angular-file/scripts/update-dist-package.js'
Is there a way to get access to the "scripts" folder required for angular-file? If it is required to the build process, could you add it to the git repository, please? Or there is other part of the process that I am missing?
Thank you for your help.
Use npm run watch
... npm run build
just makes everything compiled and ready to distribute on npm itself.
npm test
just runs a headless browser to execute the angular browser code
Heads up I did find .gitignore was ignoring files needed in the scripts folder. Meaning, npm run build
would fail.
Ok, thank you for your reports. I have pushed a fix to the .gitignore file and now the scripts folder is available to everyone.
npm run build
is now confirmed working. I checked out the project from scratch and tested the commands
Question: What branch should I try right now: master or development? Thanks.
If you are trying to use this package inside one of your own projects/packages, which I don't think you are, you use npm install angular-file --save-dev
to inject angular-file into your project/package.
I think you are trying to learn and digest this package completely, you need to use the branch development to skin this package alive inside/out.
Last thing, as you may already know, my package angular-file is a fork of someone elses outdated package. So the branch names and even some code is left over from previous owner.
I welcome all the help I can get. Please keep poking at this project
Well, it seems I am advancing a little bit in the build/run process:
git clone -b development https://github.com/AckerApple/angular-file.git cd angular-file/ npm install npm run build <- this works npm run watch <- this works to serve the page "Loading..." but nothing else
The browser console gives me this output:
Error: Module build failed: RangeError: Maximum call stack size exceeded
at getStartPositionOfRange (/home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:10079:37)
at Object.rangeEndIsOnSameLineAsRangeStart (/home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:10071:51)
at needsIndentation (/home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:68554:24)
at emitBinaryExpression (/home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:67349:40)
at pipelineEmitExpression (/home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:66865:28)
at pipelineEmitWithHint (/home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:66565:49)
at emitNodeWithSourceMap (/home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:64035:21)
at pipelineEmitWithSourceMap (//home/dummy/tmp/angular-file/node_modules/typescript/lib/typescript.js:66555:17)
I ran this test from both Linux and Mac platforms, same result. Any hint?
Thanks.
I repeated the steps EXACT to your comment and npm run watch
ran with perfection.
Google Chrome is up to date Version 63.0.3239.132 (Official Build) (64-bit)
macOS High Sierra 10.13.2
Please check: Does the angular-file online example page work for you? Because npm run watch
is equal to visiting the public demo page
Sorry, at this moment I have no additional advice other than checking browser version and such. This package is used in production.
How does it go? Still stuck?
Reopen if you need to
Hi, I am trying to test your source code following these commands: git clone https://github.com/AckerApple/angular-file.git cd angular-file/ npm install ng build
Then I got this error message: ENOENT: no such file or directory, stat '/home/dummy/tmp/angular-file/test/tsconfig.json' Error: ENOENT: no such file or directory, stat '/home/dummy/tmp/angular-file/test/tsconfig.json'
It shouldn't work out of the box? Should I do something else? Thanks,
PS: Why .ts files are missing semicolons? For example: demo/src/app/components/file-upload/simple-demo.component.ts